﻿using NOSDC.Pocos;

namespace NOSDC.Models
{
    public sealed class SpecificEvent
    {
        public Events Event { get; set; }
        public bool IsAttendingEvent { get; set; }

        public string Duration
        {
            get
            {
                var ts = Event.EndDate - Event.StartDate;
                return ts.ToString("g");
            }
        }

        public bool HasSponsors
        {
            get
            {
                return Event.Sponsors != null;
            }
        }

        public int EventId
        {
            get
            {
                return Event != null ? Event.EventID : 0;
            }
        }

        public bool HasSpeakers
        {
            get
            {
                return Event.Speakers != null && Event.Speakers.Count > 0;
            }
        }

        public bool NoEvent
        {
            get { return Event == null; }
        }
    }
}